xattr Functions
PHP Manual

xattr_remove

(PECL xattr >= 0.9.0)

xattr_remove Elimina un atributo extendido

Descripción

bool xattr_remove ( string $nombre_archivo , string $nombre [, int $opciones ] )

La función elimina un atributo extendido del archivo.

Extended attributes have two different namespaces: user and root. The user namespace is available to all users, while the root namespace is available only to users with root privileges. xattr operates on the user namespace by default, but this can be changed with the flags parameter.

Lista de parámetros

nombre_archivo

El archivo al que se elimina el atributo.

nombre

Nombre del atributo extendido a eliminar.

opciones

Opciones de xattr soportadas
XATTR_DONTFOLLOW Realizar las operaciones en el propio enlace simbólico (no seguirlo).
XATTR_ROOT Establecer atributo en el espacio de nombres raíz (y de confianza). Requiere privilegios de root.

Valores retornados

Devuelve TRUE si todo se llevó a cabo correctamente, FALSE en caso de fallo.

Ejemplos

Example #1 Eliminar todos los atributos extendidos de un archivo

<?php
$archivo 
'el_archivo';
$atributos xattr_list($archivo);

foreach (
$atributos as $nombre_atributo) {
    
xattr_remove($archivo$nombre_atributo);
}
?>

Ver también


xattr Functions
PHP Manual